<template>
    <header class="header">
        <h1>todos</h1>
        <input class="new-todo" autofocus autocomplete="off" placeholder="What needs to be done?" @keyup.enter="addTodo" />
    </header>
</template>

<script lang="ts" setup>
import useTodoStore from '../stores/useTodoStore'
let store = useTodoStore()
let addTodo=(e:any)=>{
store.addTodo(e)
e.target.value = ''
}
</script>